<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePracticalTrainingEvaluationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('practical_training_evaluations', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('practical_training_user_id')->comment("实训用户id");
            $table->unsignedInteger('users_id')->comment("评价用户id");
            $table->unsignedInteger('score')->comment("分数")->default(0)->nullable();
            $table->text('content')->comment("评价内容")->nullable();
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('practical_training_evaluations');
    }
}
